package common;

import java.util.HashMap;
import java.util.Map;

import common.Constants;

/**
 * Representa una operación de la extensión
 *
 */
public class Operation {
	
	private Constants.TYPE_OF_OPERATION typeOfOperation;
	private Map<String, String> params;
	
	public static final String USER_PARAM = "user";
	
	public Operation(Constants.TYPE_OF_OPERATION typeOfOperation) {
		this.typeOfOperation = typeOfOperation;
	}
	
	public Constants.TYPE_OF_OPERATION getType() {
		return typeOfOperation;
	}
	
	public void addParam(String key, String value) {
		if (params == null) {
			params = new HashMap<String, String>();
		}
		params.put(key, value);
	}
	
	public String getParam(String param) {
		return params.get(param);
	}

}
